import {request} from "../../utils/request";


export const login=(data:API.User.Login)=>request.post<string>("/user/login", data)
export const list=(data:API.User.List)=>request.post<PageResult<UI.List>>("/user/list", data)
export const add=(data:API.User.Add)=>request.post<null>("/user/add", data)
export const ChangePwd=(data:API.User.ChangePwd)=>request.post<null>('/user/change_pwd',data)
export const configRole=(data:API.User.ConfigRole)=>request.post<null>('/user/config_role',data)
export const valid=(data:API.User.ValidName)=>request.post<number>('/user/valid_name',data)
export const getMenu = () => request.post<Array<UI.Func>>("/user/getmenu");
export const remove=(name:string)=>request.post<null>(`/user/remove/${name}`)